<h1>FOGS DOCUMENTATION </br>Version: 1.21.80.3</h1>
<h2><p id="Index">索引</p></h2>
<table border="1">
<tr> <th><a href="#Fog Definitions">迷雾定义</a></th> </tr>
<tr> <td> <a href="#Fog Schema">迷雾架构</a> </tr> </td>
<tr> <th><a href="#Active Fog Stack">活动迷雾堆栈</a></th> </tr>
<tr> <td> <a href="#Biomes">生物群系</a> </tr> </td>
<tr> <td> <a href="#Command">命令</a> </tr> </td>
<tr> <td> <a href="#Data Default">数据默认值</a> </tr> </td>
<tr> <td> <a href="#Engine Default">引擎默认值</a> </tr> </td>
<tr> <th><a href="#Biomes">生物群系</a></th> </tr>
<tr> <th><a href="#Fog Command">Fog Command</a></th> </tr>
<tr> <td> <a href="#Pop"> Pop</a> </tr> </td>
<tr> <td> <a href="#Push"> Push</a> </tr> </td>
<tr> <td> <a href="#Remove"> Remove</a> </tr> </td>
</table>
<a href="#Index">返回顶部</a>
<h1><p id="Fog Definitions">迷雾定义</p></h1>

迷雾在 resource_packs,/'name of pack'/,fogs 目录下的 Json 文件中设置。</br><h1><p id="Fog Schema">迷雾架构</p></h1>

<h2>迷雾 JSON 架构</h2>

```</br>--------</br>{</br>    version "format_version"</br>    object "minecraft:fog_settings"</br>    {</br>        object "description"</br>        {</br>            string "identifier" // The identifier for these fog settings. The identifier must include a namespace.</br>        }</br>        object "distance" : opt // The distance fog settings for different camera locations.</br>        {</br>            object "air" : opt // The fog settings when the camera is in the air.</br>            {</br>                color "fog_color" // The color that the fog will take on.</br>                float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                object "transition_fog" : opt // Additional fog data which will slowly transition to the distance fog of current biome.</br>                {</br>                    object "init_fog" // Initial fog that will slowly transition into water distance fog of the biome when player goes into water.</br>                    {</br>                        color "fog_color" // The color that the fog will take on.</br>                        float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                        float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                        string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                    }</br>                    float "min_percent"<0.000000-1.000000> // The minimum progress of fog transition.</br>                    float "mid_seconds"<0.000000-*> // The time takes to reach certain progress('mid_percent') of fog transition.</br>                    float "mid_percent"<0.000000-1.000000> // The progress of fog transition after 'mid_seconds' seconds.</br>                    float "max_seconds"<0.000000-*> // Total amount of time takes to complete fog transition.</br>                }</br>            }</br>            object "weather" : opt // The fog settings for when the camera is in the air with active weather (rain, snow, etc..).</br>            {</br>                color "fog_color" // The color that the fog will take on.</br>                float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                object "transition_fog" : opt // Additional fog data which will slowly transition to the distance fog of current biome.</br>                {</br>                    object "init_fog" // Initial fog that will slowly transition into water distance fog of the biome when player goes into water.</br>                    {</br>                        color "fog_color" // The color that the fog will take on.</br>                        float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                        float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                        string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                    }</br>                    float "min_percent"<0.000000-1.000000> // The minimum progress of fog transition.</br>                    float "mid_seconds"<0.000000-*> // The time takes to reach certain progress('mid_percent') of fog transition.</br>                    float "mid_percent"<0.000000-1.000000> // The progress of fog transition after 'mid_seconds' seconds.</br>                    float "max_seconds"<0.000000-*> // Total amount of time takes to complete fog transition.</br>                }</br>            }</br>            object "water" : opt // The fog settings when the camera is in water.</br>            {</br>                color "fog_color" // The color that the fog will take on.</br>                float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                object "transition_fog" : opt // Additional fog data which will slowly transition to the distance fog of current biome.</br>                {</br>                    object "init_fog" // Initial fog that will slowly transition into water distance fog of the biome when player goes into water.</br>                    {</br>                        color "fog_color" // The color that the fog will take on.</br>                        float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                        float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                        string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                    }</br>                    float "min_percent"<0.000000-1.000000> // The minimum progress of fog transition.</br>                    float "mid_seconds"<0.000000-*> // The time takes to reach certain progress('mid_percent') of fog transition.</br>                    float "mid_percent"<0.000000-1.000000> // The progress of fog transition after 'mid_seconds' seconds.</br>                    float "max_seconds"<0.000000-*> // Total amount of time takes to complete fog transition.</br>                }</br>            }</br>            object "lava" : opt // The fog settings when the camera is in lava.</br>            {</br>                color "fog_color" // The color that the fog will take on.</br>                float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                object "transition_fog" : opt // Additional fog data which will slowly transition to the distance fog of current biome.</br>                {</br>                    object "init_fog" // Initial fog that will slowly transition into water distance fog of the biome when player goes into water.</br>                    {</br>                        color "fog_color" // The color that the fog will take on.</br>                        float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                        float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                        string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                    }</br>                    float "min_percent"<0.000000-1.000000> // The minimum progress of fog transition.</br>                    float "mid_seconds"<0.000000-*> // The time takes to reach certain progress('mid_percent') of fog transition.</br>                    float "mid_percent"<0.000000-1.000000> // The progress of fog transition after 'mid_seconds' seconds.</br>                    float "max_seconds"<0.000000-*> // Total amount of time takes to complete fog transition.</br>                }</br>            }</br>            object "lava_resistance" : opt // The fog settings when the camera is in lava and the player has the lava resistance effect active.</br>            {</br>                color "fog_color" // The color that the fog will take on.</br>                float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                object "transition_fog" : opt // Additional fog data which will slowly transition to the distance fog of current biome.</br>                {</br>                    object "init_fog" // Initial fog that will slowly transition into water distance fog of the biome when player goes into water.</br>                    {</br>                        color "fog_color" // The color that the fog will take on.</br>                        float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                        float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                        string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                    }</br>                    float "min_percent"<0.000000-1.000000> // The minimum progress of fog transition.</br>                    float "mid_seconds"<0.000000-*> // The time takes to reach certain progress('mid_percent') of fog transition.</br>                    float "mid_percent"<0.000000-1.000000> // The progress of fog transition after 'mid_seconds' seconds.</br>                    float "max_seconds"<0.000000-*> // Total amount of time takes to complete fog transition.</br>                }</br>            }</br>            object "powder_snow" : opt // The fog settings when the camera is inside a Powder Snow block.</br>            {</br>                color "fog_color" // The color that the fog will take on.</br>                float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                object "transition_fog" : opt // Additional fog data which will slowly transition to the distance fog of current biome.</br>                {</br>                    object "init_fog" // Initial fog that will slowly transition into water distance fog of the biome when player goes into water.</br>                    {</br>                        color "fog_color" // The color that the fog will take on.</br>                        float "fog_start" // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.</br>                        float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.</br>                        string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.</br>                    }</br>                    float "min_percent"<0.000000-1.000000> // The minimum progress of fog transition.</br>                    float "mid_seconds"<0.000000-*> // The time takes to reach certain progress('mid_percent') of fog transition.</br>                    float "mid_percent"<0.000000-1.000000> // The progress of fog transition after 'mid_seconds' seconds.</br>                    float "max_seconds"<0.000000-*> // Total amount of time takes to complete fog transition.</br>                }</br>            }</br>        }</br>        object "volumetric" : opt // The volumetric fog settings.</br>        {</br>            object "density" : opt // The density settings for different camera locations.</br>            {</br>                object "air" : opt // Fog density values as light passes through air blocks.</br>                {</br>                    float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].</br>                    float "max_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.</br>                    float "zero_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.</br>                    bool "uniform" : opt // When set to true, the density will be uniform across all heights.</br>                }</br>                object "weather" : opt // Fog density values as light passes through air blocks with active weather (rain, snow, etc..).</br>                {</br>                    float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].</br>                    float "max_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.</br>                    float "zero_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.</br>                    bool "uniform" : opt // When set to true, the density will be uniform across all heights.</br>                }</br>                object "water" : opt // Fog density values as light passes through water blocks.</br>                {</br>                    float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].</br>                    float "max_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.</br>                    float "zero_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.</br>                    bool "uniform" : opt // When set to true, the density will be uniform across all heights.</br>                }</br>                object "lava" : opt // Fog density values as light passes through lava blocks.</br>                {</br>                    float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].</br>                    float "max_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.</br>                    float "zero_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.</br>                    bool "uniform" : opt // When set to true, the density will be uniform across all heights.</br>                }</br>                object "lava_resistance" : opt // Fog density values as light passes through lava blocks while the player has lava resistance.</br>                {</br>                    float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].</br>                    float "max_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.</br>                    float "zero_density_height"<-64.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.</br>                    bool "uniform" : opt // When set to true, the density will be uniform across all heights.</br>                }</br>            }</br>            object "media_coefficients" : opt // The coefficient settings for the volumetric fog in different blocks.</br>            {</br>                object "air" : opt // Fog coefficient values while light passes through air.</br>                {</br>                    color "scattering" // Proportion of light that is scattered per block.</br>                    color "absorption" // Proportion of light that is absorbed (lost) per block.</br>                }</br>                object "water" : opt // Fog coefficient values while light passes through water.</br>                {</br>                    color "scattering" // Proportion of light that is scattered per block.</br>                    color "absorption" // Proportion of light that is absorbed (lost) per block.</br>                }</br>                object "cloud" : opt // Fog coefficient values while light passes through clouds.</br>                {</br>                    color "scattering" // Proportion of light that is scattered per block.</br>                    color "absorption" // Proportion of light that is absorbed (lost) per block.</br>                }</br>            }</br>        }</br>    }</br>}</br></br>----------</br>```</br><a href="#Index">返回顶部</a><br><br>

<br><br>

<h1><p id="Active Fog Stack">活动迷雾堆栈</p></h1>

<h2>活动迷雾堆栈</h2>

活动迷雾堆栈用于确定在游戏中的任何给定时间使用哪个 fog 设置。每个玩家都有一个独特的雾堆栈。</br></br>每当游戏需要确定雾的值时，它将从雾堆栈的顶部开始，然后向下检查，直到找到当前设置类型的值。因此，如果堆栈上的 fog 设置没有它正在寻找的设置，那么它将继续在堆栈中向下并签入。如果找不到此类设置，它将改用引擎定义的默认值。</br></br>雾堆栈的初始设置如下。从底部开始：</br>- Engine Default：硬编码值。</br>- Data Default: 默认的数据驱动设置。</br>- Biomes: 定义为在每个生物群系上的设置。</br>- Command: 服务器命令在玩家上设置的设置。</br><h1><p id="Biomes">生物群系</p></h1>

<h2>生物群系</h2>

生物群系图层是玩家位置周围生物群系定义的所有设置的平均值。生物群系设置也以 “biomes_client.json” 为单位为每个单独的生物群系定义。</br><a href="#Index">返回顶部</a><br><br>

<h1><p id="Command">命令</p></h1>

<h2>命令</h2>

命令层是由 “/fog” 命令设置的所有设置，并将其从上到下评估为一个堆栈。更多细节请参见 “Fog Command” 部分。</br><a href="#Index">返回顶部</a><br><br>

<h1><p id="Data Default">数据默认值</p></h1>

<h2>数据默认值</h2>

如果它通过 “fog_identifier” 引用雾定义，则在 “default” 下的 “biomes_client.json” 中定义。</br><a href="#Index">返回顶部</a><br><br>

<h1><p id="Engine Default">引擎默认值</p></h1>

<h2>引擎默认值</h2>

硬编码值（如果没有数据驱动值）;堆栈的隐式底部。</br><a href="#Index">返回顶部</a><br><br>

<br><br>

<h1><p id="Biomes">生物群系</p></h1>

<h2>生物群系</h2>

可以使用 “biomes_client.json” 确定生物群系的迷雾设置。在每个生物群系条目中，您可以有一个名为 “fog_identifier” 的变量，并设置一个与您要用于此生物群系的雾设置相匹配的名称。</br></br>“default” 条目也可以通过这种方式设置，并将在活动雾堆栈中的生物群系条目下使用。因此，生物群系的雾设置并不会完全替换默认设置，而是在默认设置之上读取生物群系，如 “Active Fog Stack” 部分所述。</br></br>“default”生物群系条目有标签 “remove_all_prior_fog”，默认为 “false”。</br>当设置为 false 时（或未输入标签），缺少的迷雾定义将由任何填充了定义的较低资源包填充。</br>当设置为 true 时，将清除资源包中启用它的当前包之前的所有先前迷雾定义，从而有效地使当前资源包成为所有迷雾的新起点。</br></br>在每个生物群系（包括“default”）中，都有标签“inherit_from_prior_fog”，也默认为“false”。</br>当设置为 false 时（或未输入标签），当前资源包的生物群系将用自己的标签覆盖当前存储的 “fog_identifier” 标签。</br>当设置为 true 时，来自所有匹配生物群系的 “fog_identifier” 标签将被添加在一起，并为该生物群系创建一个新的合并迷雾定义。</br><a href="#Index">返回顶部</a><br><br>

<h1><p id="Fog Command">Fog Command</p></h1>

<h2>Fog命令</h2>

“/fog” 可用于管理每个玩家的活动迷雾堆栈的这一层中的迷雾设置。</br></br>该层中的迷雾设置通过下面描述的 “/fog” 命令的 “push”、“pop” 和 “remove” 模式进行排序。</br>迷雾设置会在活动雾堆栈中从上到下进行评估，其中首先包括本层中从上到下的雾化设置</br></br>此图层中的迷雾设置将保存，然后在每个玩家的世界加载时恢复。这样，在世界保存之前推送的迷雾设置在世界加载之后仍将应用，然后可以压入。</br><h1><p id="Pop">Pop</p></h1>

<h2>压入</h2>

从所选玩家中删除与用户提供的 ID 匹配的最顶层迷雾设置（即之前通过“/fog push”命令提供）。</br><a href="#Index">返回顶部</a><br><br>

<h1><p id="Push">Push</p></h1>

<h2>弹出</h2>

将新的迷雾设置连同用户提供的 ID 一起推送到玩家的活动迷雾堆栈的 Fog Command 层的顶部。</br><a href="#Index">返回顶部</a><br><br>

<h1><p id="Remove">Remove</p></h1>

<h2>移除</h2>

从所选玩家中删除与用户提供的 ID 匹配的所有匹配迷雾设置（即之前通过一个或多个“/fog push”命令提供的 ID）。</br><a href="#Index">返回顶部</a><br><br>

<br><br>

